home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d20
/
msgq160s.arc
/
NOSNOW.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-10-26
|
1KB
|
83 lines
; No Snow screen writes for Msged/Q
; Written by P.J. Muller
; Turbo Assembler 1.0
IDEAL
MODEL MEDIUM,C ; SMALL, MEDIUM or LARGE
DOSSEG
CODESEG
; Write character and attribute without snow
; void wrscrch(unsigned int far *addr, unsigned int chattr)
PUBLIC wrscrch
PROC wrscrch addr:FAR PTR DWORD, chattr:WORD
USES DS,ES,DI
xor ax,ax
mov ds,ax ; and get base address of active
mov ax,[0463h] ; display card
add ax,6 ; add six to get status register
mov dx,ax
les di,[addr]
mov bx,[chattr]
@@L1: in al,dx ; get status
test al,1 ; is it low?
jnz @@L1 ; if not, wait until it is
@@L2: in al,dx
test al,1 ; is it high?
jz @@L2
mov ax,bx
stosw
ret
ENDP wrscrch
; Write characters and attribute without snow
; void wrscrstr(unsigned int far *addr, char far *str, int len, BYTE attr)
PUBLIC wrscrstr
PROC wrscrstr addr:FAR PTR DWORD, sttt:FAR PTR DWORD, len:WORD, attr:BYTE
USES DS,SI,ES,DI
xor ax,ax
mov ds,ax ; and get base address of active
mov ax,[0463h] ; display card
add ax,6 ; add six to get status register
mov dx,ax
les di,[addr]
lds si,[sttt]
mov cx,[len]
mov bh,[attr]
cld
@@L0: lodsb
mov bl,al
@@L1: in al,dx ; get status
test al,1 ; is it low?
jnz @@L1 ; if not, wait until it is
@@L2: in al,dx
test al,1 ; is it high?
jz @@L2
mov ax,bx
stosw
loop @@L0
ret
ENDP wrscrstr
END